package com.tuhu.server.web.controller;

import com.tuhu.server.util.TimeUtil;
import com.tuhu.server.web.resp.ResultBean;
import com.tuhu.server.web.resp.helper.ResponseCreator;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("")
public class TestController {

    /**
     * 用于测试web服务是否已成功部署
     * 请求不需要签名
     */
    @GetMapping("/test")
    public ResponseEntity<ResultBean<String>> test(HttpServletRequest request) {
        return ResponseCreator.creatOk("成功", 0, "恭喜已成功部署，time = " + TimeUtil.now2());
    }


}
